package cn.oa.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.oa.bean.Account;
import cn.oa.bean.Announcement;
import cn.oa.mapper.AnnouncementMapper;
import cn.oa.service.AnnouncementService;
@Service
public class AnnouncementServiceImpl implements AnnouncementService{
	@Resource
	AnnouncementMapper annMapper;
	
	public List findDepartmentAnn(Account account) {
		return annMapper.findDepartmentAnn(account);
	}

	@Override
	public List<Announcement> findAllAnn() {
		return annMapper.findAllAnn();
	}

	@Override
	public boolean addAnn(Announcement ann) {
		return annMapper.insertAnn(ann);
	}
	public Integer query(Account account){
		return annMapper.query(account);
	}
}
